<template>
	<view>
		<view class="page-body">
			<navbar backText="" background="transparent" backColor="#fff" title="直播结束"></navbar>
			<view class="live-box" :style="{background:'url('+baseUrl + liveInfo.cover_img+')',backgroundSize:'cover'}">
				<view class="live-mask u-p-30 u-p-t-80">
					<view class="u-flex u-row-center" style="margin-top: 120rpx;">
						<u-image shape="circle" width="200" height="200" mode="aspectFill" :src="headimgurl?headimgurl:'/static/public/images/headimgurl.jpg'"></u-image>
					</view>
					<view class="liveroom-url mt20">
						<view class="text-center color-ff">
							<view class="fs42">{{liveInfo.anchor_name}}</view>
						</view>
					</view>
					<view class="text-center color-ff u-m-t-80">
						<view class="fs60">本次直播已结束</view>
						<view class="fs38 mt20">{{liveInfo.start_time}}-{{liveInfo.end_time}} 共{{liveInfo.min}}分钟</view>
						<view class="u-m-t-60">
							<u-button shape="circle" :hair-line="false"
							:custom-style="{border:'none'}" class="defaultbtn" @click="app.goPage('/')">返回首页</u-button>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import TWebLive from 'tweblive'
	import navbar from "@/components/navbar.vue"

	export default {
		components:{
			navbar
		},
		data() {
			return {
				baseUrl: this.config.baseUrl,
				liveInfo: {},
				headimgurl: ''
			}
		},
		onLoad(options) {
			//this.app.isLogin(this); //强制登陆
			//this.checkTips();
			this.getLiveInfo(options.roomid);
		},
		methods: {
			getLiveInfo(roomid) {
				//获取会员中心信息
				this.$u.get('live/api.live/getLiveInfo?roomid='+roomid).then(res => {
					this.liveInfo = res.data.liveInfo;
					this.headimgurl = this.baseUrl + this.liveInfo.cover_img;
				});
			},
		}
	}
</script>
<style lang="scss" scoped>
	@import url("../static/css/live.scss");

	.live-box {

		.form {
			margin-top: 100rpx;
			background: rgba($color: #000000, $alpha: 0.2);
			border-radius: 24rpx;
			padding: 25rpx;

			.upload-btn {
				width: 200rpx;
				height: 200rpx;
				background: rgba($color: #fff, $alpha: .2);
				border-radius: 12rpx;
			}
		}

		.footer-box {
			position: fixed;
			bottom: 100rpx;
			left: 0;
			right: 0;
		}

	}
	
</style>
